package com.EAsystem.service;

import com.EAsystem.entity.Leave;
import com.github.pagehelper.PageInfo;

import java.util.List;

public interface LeaveService {

    // 添加请假记录
    boolean addLeave(Leave leave);

    // 更新请假记录
    boolean updateLeave(Leave leave);

    // 删除请假记录
    boolean deleteLeave(Integer id);

    // 根据ID查询请假记录
    Leave getLeaveById(Integer id);



    // 根据学生ID查询请假记录
    List<Leave> getLeavesByStudentId(Integer studentId);



    // 分页查询所有请假记录
    PageInfo<Leave> getAllLeavesWithPage(int pageNum, int pageSize);

    // 条件查询请假记录
    PageInfo<Leave> getLeavesByConditionWithPage(Leave leave, int pageNum, int pageSize);

    // 审批请假记录
    boolean approveLeave(Integer id, Integer status);

    // 根据教师ID分页查询请假记录
    PageInfo<Leave> getLeavesByTeacherWithPage(Integer teacherId, Long courseId, Integer status, int pageNum, int pageSize);
}